import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '../views/Home.vue'
import Login from '@/views/Login'
import Register from '@/views/Register'
import Video from '@/views/Video'
import User from '@/views/User'
import Self from '@/views/Self'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
	  path: '/login',
	  name: 'Login',
	  component: Login
  },
  {
	  path: '/register',
	  name: 'Register',
	  component: Register
  },
  {
	  path: '/video/:videoId',
	  name: 'Video',
	  component: Video
  },
  {
	  path: '/user/:userId',
	  name: 'User',
	  component: User
  },
  {
	  path: '/self',
	  name: 'Self',
	  component: Self
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
